package GameObjects.Ships.Engines;

import java.awt.event.ActionListener;

import GUI.BottomPanel;
import GameObjects.Instances.Instances;
import GameObjects.Physics.Position;
import GameObjects.Ships.ShipObject;

public abstract class ShipEngine extends ShipObject
{
	protected double energyCost;
	private double speed;
	public double Speed()
	{
		if(hasHealth())
			return speed;
		return 0;
	}
	private double rotateSpeed;
	public double RotateSpeed()
	{
		if(hasHealth())
			return rotateSpeed;
		return 0;
	}
	
	public ShipEngine(Instances instances, Position position, double health, double speed, double rotateSpeed, double energyCost) 
	{
		super(instances, position, health);
		this.speed = speed;
		this.rotateSpeed = rotateSpeed;
		this.energyCost = energyCost;
	}

	@Override
	public void setPanel(ActionListener actionListener, BottomPanel panel)
	{

	}
	
	public double cost()
	{
		return energyCost;
	}
}
